<template>
  <div>
    <div class="main">
      <div class="serve" v-for="item in listData" :key="item.id" >
        <span>{{item.title}}</span>
        <van-button @click="submit(item.id,item.has_data,item.data_id)">{{item.has_data==1?'查看':'填写'}}</van-button>
      </div>
    </div>
    <yz-blank :datas="listData"></yz-blank>


  </div>
</template>
<script>
import mixins from "../mixin.js";
export default {
  mixins: [mixins],
  data() {
    return {
      current_statue: true,
      name: "",
      isloading:false,
      logo: "",
      httpUrl: "plugin.lawyer-platform.frontend.controllers.diy-form.getList",
    };
  },
  methods: {
    submit(id,has_data,data_id){
      localStorage.setItem("lawyerForm",JSON.stringify({id,has_data,data_id}));
      this.$router.push(this.fun.getUrl('lawyerForm',{id,data_id,has_data}))

    },
    edit(id) {
      this.$router.push(this.fun.getUrl("enterpriseEdit", { id }));
    },
    del_enterprise({ name, id }, i) {
      this.$dialog.confirm({
        title: '删除',
        message: '是否删除' + name,
      }).then(res => {
        $http.post("plugin.lawyer-platform.frontend.controllers.business.delete", { id }).then(({ result, msg }) => {
          if (result) this.listData.splice(i, 1);
          this.$toast(msg);
        })
      })
    }
  }
};
</script>
<style scoped lang="scss">
@import "./index.scss";
</style>